package com.mytest;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MovieController {

    MovieService movieService;

    @GetMapping("/movie/{id:\\d+}")
    public Movie findById(@PathVariable Integer id) {

        return new Movie(1001,"无间道II","Andy Liu");
    }

    @GetMapping("/test")
    public String test() {

        String film = movieService.getFilm();
        return film;
    }
}
